﻿using UnityEngine;
using System.Collections;

public class mainMenu : MonoBehaviour {
    public Texture2D stage1_btn;
    public Texture2D stage2_btn;
    public Texture2D stage3_btn;
    public Texture2D quit_btn;
    public string stringToEdit = eduProgramClient.id;
    public string stringToEdit1 = eduProgramClient.id;
	// Use this for initialization
    void OnGUI()
    {
        var w = Screen.width/5;
        var h = Screen.height;

        GUIStyle style = new GUIStyle();
        style.fontSize = 20;
        style.normal.textColor = Color.black;

        //GUI.DrawTexture(new Rect(0, 0, w, h), (Texture)Resources.Load("Images/login_background"));

        var btn1 = GUI.Button(new Rect(w, h/4, 170, 170), stage1_btn);
        var btn2 = GUI.Button(new Rect(5 * w / 2 -85, h / 4, 170, 170), stage2_btn);
        var btn3 = GUI.Button(new Rect(4 * w - 170, h / 4, 170, 170), stage3_btn);
        var btn4 = GUI.Button(new Rect(5 * w / 2 - 85, 3 * h / 4, 170, 170), quit_btn, "QUIT");

        stringToEdit = eduProgramClient.id;
        stringToEdit1 = "Please, Choose Menu!";
        GUI.Label(new Rect(300, 20, 130, 50), stringToEdit, style);
        GUI.Label(new Rect(300, 50, 130, 50), stringToEdit1, style);

        if (btn1 == true)
        {
			print ("1");
        }

        if (btn2 == true)
        {   
			print ("2");//2단계로 넘어간다
            Application.LoadLevel("stg2_1");
        }

        if (btn3 == true)
        {
			print ("3");
            Application.LoadLevel("stg3");  //3단계로 넘어간다
        }

        if (btn4 == true)
        {
            Application.Quit();
            return;
        }
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
